package A1_2_College;

public class CollegeTest {
    // 主方法测试
    public static void main(String[] args) {
        // 创建建筑
        Building teachingBuilding = new Building("教学楼J3", "校园路1号");
        Building labBuilding = new Building("实验楼J1", "校园路2号");

        // 创建课程（课程必须关联建筑）
        Course mathCourse = new Course("高等数学", 4, teachingBuilding);
        Course javaCourse = new Course("面对对象", 3, labBuilding);

        // 创建学院并添加建筑和课程
        College computerCollege = new College("计算机与信息学院");
        computerCollege.addBuilding(teachingBuilding);
        computerCollege.addBuilding(labBuilding);
        computerCollege.addCourse(mathCourse);
        computerCollege.addCourse(javaCourse);

        // 输出学院信息
        computerCollege.getCollegeInfo();
    }
}
